﻿<%@ Page Title="Publications" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Publications.aspx.cs" Inherits="PublSystem.Publications" %>
<asp:Content ID="Pubs" ContentPlaceHolderID="MainContent" runat="server">
    
    <asp:Repeater ID="publs" runat="server">
    <ItemTemplate>
            <h3><b><asp:Label ID="txtTitle" runat="server" Text='<%# "<a href=\"Publication?id=" + Eval("publicationId") + "\">"+ Eval("title") + "</a>" %>' /></b></h3> 
            Link: <asp:Label ID="txtLink" runat="server" Text='<%# "<a href=\"" + (Eval("link").ToString() == "Publication?id=" ? "Publication?id="+ Eval("publicationId") : Eval("link")) + "\">" + (Eval("link").ToString() == "Publication?id=" ? "Publication?id="+ Eval("publicationId") : Eval("link")) + "</a>" %>' /><br/>
            Published: <asp:Label ID="txtPublished" runat="server" Text='<%# String.Format("{0:d}", Eval("published")) %>' /><br/>
            <p>Updated: <asp:Label ID="txtUpdated" runat="server" Text='<%# String.Format("{0:d}", Eval("updated")) %>' /></p>
                      <p><asp:Label ID="Label1" class="btn btn-default" runat="server" Text='<%# "<a href=\"Delete?article=" + Eval("publicationId") + "\">Delete</a>" %>' /> <asp:Label ID="EditLbl" class="btn btn-default" runat="server" Text='<%# "<a href=\"Edit?id=" + Eval("publicationId") + "\">Edit</a>" %>' /></p>
                    <p><asp:Label ID="txtSummary" runat="server" Text='<%# Eval("summary") %>' /></p>                     
    </ItemTemplate>
</asp:Repeater>
    <br/>
<asp:Repeater ID="pageNums" runat="server">
    <ItemTemplate>
            <asp:Label ID="tetLink" runat="server" Text='<%# "<a href=\"" + Eval("Link") + "\">" + Eval("PageId") + "</a>" %>' />                               
    </ItemTemplate>
</asp:Repeater>
</asp:Content>
